package com.project.bean;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.time.LocalDate;
/**上架商品类*/
@Data
@ApiModel(value = "上架商品类")
@TableName("t_showgoods")
public class ShowGoodsBean {
    /**商品编号*/
    @ApiModelProperty(hidden = true)
    @TableId(value = "pk_showGoodsId",type = IdType.INPUT)
    private Integer id;
    /**商品名*/
    @ApiModelProperty(value = "商品名")
    @TableField("sg_name")
    private String name;
    /**商品规格*/
    @ApiModelProperty(value = "商品规格")
    @TableField("sg_size")
    private String size;
    /**商品颜色*/
    @ApiModelProperty(value = "商品颜色")
    @TableField("sg_color")
    private String color;
//    /**产地*/
//    @ApiModelProperty(value = "产地")
//    @TableField("sg_createAddress")
//    private String createAddress;
//    /**出厂日期*/
//    @ApiModelProperty(value = "出厂日期")
//    @TableField("sg_createDate")
//    private LocalDate createDate;
    /**售价*/
    @ApiModelProperty(value = "售价")
    @TableField("sg_salePrice")
    private double salePrice;
    /**封面图片路径*/
    @ApiModelProperty(value = "封面图片路径")
    @TableField("sg_picturePath")
    private String picturePath;
    /**ES数据库ID*/
    @ApiModelProperty(value = "ES数据库ID")
    @TableField("sg_esId")
    private Integer esId;
    /**销售描述文本*/
    @ApiModelProperty(value = "销售描述文本")
    @TableField("sg_text")
    private String text;

    /**商品类型*/
    @ApiModelProperty(value = "商品类型")
    @TableField("sg_type")
    private String type;
    /**数量*/
    @ApiModelProperty(value = "数量")
    @TableField("sg_num")
    private Integer num;

    /**状态*/
    @ApiModelProperty(value = "状态")
    @TableField("sg_status")
    private String status = "请求上架";


    public ShowGoodsBean() {
    }


    public ShowGoodsBean(Integer id, String name, String size, String color, double salePrice, String picturePath, Integer esId, String text, String type, Integer num) {
        this.id = id;
        this.name = name;
        this.size = size;
        this.color = color;
        this.salePrice = salePrice;
        this.picturePath = picturePath;
        this.esId = esId;
        this.text = text;
        this.type = type;
        this.num = num;
    }


    @Override
    public String toString() {
        return "\nShowGoodsBean{" +
                "id=" + id +
                ", name='" + name + '\'' +
                ", size='" + size + '\'' +
                ", color='" + color + '\'' +
                ", salePrice=" + salePrice +
                ", picturePath='" + picturePath + '\'' +
                ", esId=" + esId +
                ", text='" + text + '\'' +
                ", type='" + type + '\'' +
                ", num=" + num +
                '}';
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getSize() {
        return size;
    }

    public void setSize(String size) {
        this.size = size;
    }

    public String getColor() {
        return color;
    }

    public void setColor(String color) {
        this.color = color;
    }

    public double getSalePrice() {
        return salePrice;
    }

    public void setSalePrice(double salePrice) {
        this.salePrice = salePrice;
    }

    public String getPicturePath() {
        return picturePath;
    }

    public void setPicturePath(String picturePath) {
        this.picturePath = picturePath;
    }

    public Integer getEsId() {
        return esId;
    }

    public void setEsId(Integer esId) {
        this.esId = esId;
    }

    public String getText() {
        return text;
    }

    public void setText(String text) {
        this.text = text;
    }

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

    public Integer getNum() {
        return num;
    }

    public void setNum(Integer num) {
        this.num = num;
    }

    public String getStatus() {
        return status;
    }

    public void setStatus(String status) {
        this.status = status;
    }
}
